// import "babel-polyfill";
import Vue from "vue";
import "lib-flexible";
import App from "./App.vue";
import router from "@/router";
import store from "@/store";
// 导航守卫
import "utils/permission";

// import SvgIcon from "components/SvgIcon";
// import "@/icons"; // icon
import "@/style/common.scss";
// import { Lazyload, Toast } from "vant";
// import ButtonT from "./components/kuang";
// WebSocket
// import VueSocketIO from 'vue-socket.io';
import VueI18n from "vue-i18n";
// 全局引入按需引入UI库 vant
// import '@/plugins/vant'
// 引入vue ant design
// import "@vant/touch-emulator";
// import ant from "./utils/ant";

// Vue.use(Toast);
Vue.use(VueI18n);
// Vue.prototype.$echarts = echarts;
const i18n = new VueI18n({
  locale: localStorage.getItem("language") || "zh", // 使用localStorage缓存到本地，当下次使用时可默认当前使用语言
  messages: {
    zh: require("./common/lang/zh.js"),
    en: require("./common/lang/en.js"),
  },
});

// import socketio from 'socket.io-client';

// Vue.use(Lazyload);
// Vue.use(ant);
new Vue({
  router,
  store,
  i18n,
  render: h => h(App),
}).$mount("#app");
